extends ../layout

block content

    include ../header

    link(href="/stylesheets/user_update.css", rel="stylesheet")

    #update-container
        .information-block
            span.item-label 头像
            .item-content
                .static-content#profile-static-content
                    img.ui.circular.image.avator-image(width='120' height='120' src='/uploads/heads/' + '#{profile}')
                    i.edit.icon.edit-icon
                        span 修改
                .edit-content#profile-edit-content
                    img.ui.circular.image.avator-image(id='cover' width='120' height='120' src='/uploads/heads/' + '#{profile}')
                    form(method='post' action='/user/update/profile' enctype='multipart/form-data')
                        input(id='up' type='file' accept='image/*' name='profile')
                        p(style='margin-top:20px') 图片格式: gif, jpeg, jpg, bmp, png
                        div(style='display:none')
                            input(type='text' name='id' value='#{user_id}')
                            input.submit(type='submit')
                    .button-container
                        button#profile-save-btn.ui.primary.button(type='submit') 保存
                        button.ui.button.cancel-btn 取消
            .clear
        .information-block
            span.item-label 邮箱
            .item-content
                .static-content
                    p.item-content #{email}
            .clear
        .information-block
            span.item-label 用户名
            .item-content
                .static-content#username-static-content
                    span#username-item-content.item-content #{username}
                    i.edit.icon.edit-icon
                        span 修改
                .edit-content#username-edit-content
                    .ui.input
                        input(name="username" value="#{username}")
                    .button-container
                        button#username-save-btn.ui.primary.button 保存
                        button.ui.button.cancel-btn 取消
            .clear
        .information-block
            span.item-label 密码
            .item-content
                .static-content#password-static-content
                    i.edit.icon.edit-icon.edit-password-icon
                        span 修改密码
                .edit-content#password-edit-content
                    .ui.input
                        input(name="password" type="password" placeholder="原密码")
                    .ui.input
                        input(name="new-password" type="password" placeholder="新密码")
                    .ui.input
                        input(name="comfirm-password" type="password" placeholder="确认新密码")
                    .button-container
                        button#password-save-btn.ui.primary.button 保存
                        button.ui.button.cancel-btn 取消
            .clear
        .information-block
            span.item-label 自我介绍
            .item-content
                .static-content#introduction-static-content
                    span#introduction-item-content.item-content #{introduction}
                    i.edit.icon.edit-icon
                        span 修改
                .edit-content#introduction-edit-content
                    .ui.form
                        - if (introduction !== "undefined")
                            textarea(name="introduction" rows="3") #{introduction}
                        - else
                            textarea(name="introduction" rows="3")
                    .button-container
                        button#introduction-save-btn.ui.primary.button 保存
                        button.ui.button.cancel-btn 取消
            .clear
    include ../footer
    script(src="/javascripts/user_update.js")